package cn.four.hqServer.modules.withdraw.controller;

import cn.four.hqServer.common.result.Result;
import cn.four.hqServer.modules.transfer.dto.TranDto;
import cn.four.hqServer.modules.withdraw.dto.WithdrawDto;
import cn.four.hqServer.modules.withdraw.service.xqxIHqWithdrawService;
import cn.four.hqServer.common.entity.HqCardInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

/**
 * @author xqx
 * @since 2023-02-22
 */
@Api(tags = "柜台取款")
@RestController
@RequestMapping("/withdraw")
public class XqxHqWithdrawController {

    @Autowired
    private xqxIHqWithdrawService hqWithdrawService;



    @PostMapping("/Withdraw")
    @ApiOperation(value = "取款")
    @ResponseBody
    @Transactional
    public Result<String> HqWithdraw(@RequestBody @Validated WithdrawDto withdrawDto){
        return hqWithdrawService.withdrawMoney(withdrawDto);


    }


}
